Fix bug #13262 with crashes in completion on MS-Windows with non-ASCII filenames.
authorEli Zaretskii <eliz@gnu.org>
Mon, 24 Dec 2012 16:15:13 +0000 (18:15 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 24 Dec 2012 16:15:13 +0000 (18:15 +0200)
commit0a0fec277be36185ed83c5f773a68b5b1e7c01b9
treeef483c21d6216db72f9393d45e54edc7e8117aac
parent6d265a899234a32f54efddd12e1cd1a057bd5f96
Fix bug #13262 with crashes in completion on MS-Windows with non-ASCII filenames.

 src/fileio.c (file_name_as_directory, directory_file_name): Accept
 an additional argument MULTIBYTE to indicate whether the input C
 came from a multibyte or a unibyte Lisp string; all callers
 adjusted.  Don't assume the input string is always multibyte.
 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
 don't ENCODE_FILE them, and return a unibyte string if the input
 was unibyte.
 (Fexpand_file_name): Don't mix unibyte with multibyte strings, and
 don't assume the input strings will always be multibyte.  If the
 input strings are multibyte, decode strings obtained from C
 library functions.
src/ChangeLog
src/fileio.c